package com.wanho.qz103.hrsaas.process.service;

import com.wanho.qz103.hrsaas.commons.exception.ServiceException;
import com.wanho.qz103.hrsaas.commons.query.Page;
import com.wanho.qz103.hrsaas.commons.query.Query;
import com.wanho.qz103.hrsaas.commons.vo.TableVO;
import com.wanho.qz103.hrsaas.process.pojos.Quit;
import com.wanho.qz103.hrsaas.process.vo.DefinitionVO;
import com.wanho.qz103.hrsaas.process.vo.InstanceVO;
import com.wanho.qz103.hrsaas.process.vo.TaskVO;

import java.util.List;
import java.util.Map;

/**
 * 请假流程 业务
 */
public interface ProcessService {
    boolean commit(Map<String,String[]> paramMap) throws ServiceException ;
    /**
     * 根据 实例id 查询历史任务
     * @param processInstanceId
     * @return
     * @throws ServiceException
     */
    List<TaskVO> findTaskHistoryByProcessInstanceId(String processInstanceId) throws ServiceException ;

    /**
     * 根据 流程实例id 查询当前流程实例详情
     * @param processInstanceId  流程实例id
     * @return  实例vo对象
     * @throws ServiceException
     */
    InstanceVO findProcessInstanceById(String processInstanceId) throws ServiceException ;

    /**
     * 启动  流程
     * @param paramMap
     * @return
     * @throws ServiceException
     */
    boolean startProcess(Map<String,String[]> paramMap) throws ServiceException ;

    /**
     * 分页查询：
     * @param page 封装的分页查询条件
     * @return
     * @throws ServiceException
     */
    TableVO findPage(Page page) throws ServiceException ;

    List<DefinitionVO> findAllProcessDefinition() throws ServiceException ;
}
